﻿/*
This file is under Microsoft Public License (MS-PL)
Copyright Yohann MARTEL.  All rights reserved.
Codeplex: http://amf.codeplex.com
AMF Website: http://www.ymartel.com/aspnet-mobile-framework/
*/
namespace Mobile.WebControls.Field
{
    public class FlipToggleSwitchField : Field
    {
        #region Properties
        public string FieldName { get; set; }
        public string OptionOneValue { get; set; }
        public string OptionOneText { get; set; }
        public string OptionTwoValue { get; set; }
        public string OptionTwoText { get; set; }

        #endregion

        #region Methods
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            FlipToggleSwitchControl flipToggleSwitchControl = new FlipToggleSwitchControl();
            flipToggleSwitchControl.OptionOneValue = OptionOneValue;
            flipToggleSwitchControl.OptionOneText = OptionOneText;
            flipToggleSwitchControl.OptionTwoText = OptionTwoText;
            flipToggleSwitchControl.OptionTwoValue = OptionTwoValue;
            flipToggleSwitchControl.FieldName = FieldName;

            Controls.Add(flipToggleSwitchControl);
            SetLabelForControlId(flipToggleSwitchControl.ClientID);
        }
        #endregion
    }
}
